package com.hmall.common.client;

import com.hmall.common.dto.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("orderservice")
public interface OrderClient {

    /**
     * 通过Id查询订单
     * @param id
     * @return
     */
    @GetMapping("/order/{id}")
    Order findById(@PathVariable Long id);

    @GetMapping("/order/5/{id}")
    void updateStatus(@PathVariable Long id);
}
